package com.neuedu.dao;

import com.neuedu.common.JSONData;
import com.neuedu.pojo.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Integer id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    UserInfo login(@Param("username") String username,@Param("password") String password);

    int checkUserName(String username);

    int checkEmail(String email);

    int updateUserLastLoginTime(String username);

    String getUserQuestion(String name);

    int checkUserAnswer(@Param("username") String username,@Param("answer") String answer);

    int resetPassword(@Param("username") String username,@Param("newpassword") String newpassword);

    UserInfo getUserInfoById(int id);

    int updateUserInfoById(UserInfo userInfo);

}